﻿@using MC.RideEvent.Mvc.Models.ViewModel

@model IEnumerable<EventViewModel>

@{
    ViewBag.Title = "Liste evenements";
}

<h2>Liste evenements</h2>

<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.NamePlace)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Img)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Price)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Address)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.City)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Cp)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DateBegin)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DateEnd)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.SiteLink)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NamePlace)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Img)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Price)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.City)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Cp)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DateBegin)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DateEnd)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.SiteLink)
        </td>
        <td>
            @Html.ActionLink("Detail", "Detail", new { id=item.Id })
        </td>
    </tr>
}

</table>
